import React from "react";

export default class ReduxDemo extends React.Component {
    constructor(props) {
        super(props);
    }

    handlePlus = (event) => {
        this.props.store.dispatch({type: "+1"});
    }

    handleMinus = (event) => {
        this.props.store.dispatch({type: "-1"});
    }

    render() {
        return (
            <div className="container" style={{paddingTop:30}}>
                <p>{this.props.store.getState()}</p>
                <br/>
                <button type="button" onClick={this.handlePlus}>+1</button>
                <button type="button" onClick={this.handleMinus}>-1</button>
            </div>
        );
    }
}